﻿using System.Security.Cryptography;
using System.Text;

namespace ProjectScheduling_web
{
    public static class Common
    {
        public static string Md5(string input)
        {
            byte[] hashBytes = MD5.HashData(Encoding.UTF8.GetBytes(input));
            return BitConverter.ToString(hashBytes).Replace("-", "").ToLower();
        }
        public static string FirstNotNull(params string[] input)
        {
            if (input.Length == 0) return "";
            foreach (var item in input)
            {
                if (!string.IsNullOrEmpty(item)) return item;
            }
            return "";
        }
    }
}
